{php include pubTemplate("header")}

<div class="container">

    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
            <li class="breadcrumb-item"><a href="{tsUrl('group')}">{$TS_APP['appname']}</a></li>
            <li class="breadcrumb-item"><a href="{tsUrl('group','show',array('id'=>$strGroup['groupid']))}">{$strGroup[groupname]}</a></li>
            <li class="breadcrumb-item active" aria-current="page">小组设置</li>
        </ol>
    </nav>

    <div class="card">
        <div class="card-body">
{template edit_xbar}


<div class="row">
<div class="col-md-8">



<form class="form-inline" method="POST" action="{tsUrl('group','edit',array('ts'=>'typeadd','groupid'=>$groupid))}">


    <input style="width: 50%" name="typename" class="form-control form-control-sm" placeholder="添加帖子分类">


<input type="hidden" name="groupid" value="{$strGroup[groupid]}" />
  <button type="submit" class="btn btn-sm btn-info ml-1">添加</button>

    <a class="btn btn-sm btn-outline-secondary ml-1" href="{tsUrl('group','show',array('id'=>$strGroup[groupid]))}">返回小组</a>

</form>



<table class="table table-bordered mt-3">
<thead class="thead-light">
<tr>
<th>类型</th><th>操作</th>
</tr>
</thead>

<tbody>
{loop $arrGroupType $key $item}

<form class="form-control" method="post" action="{tsUrl('group','edit',array('ts'=>'typeedit','groupid'=>$groupid))}">
<tr>
<td>

        <input class="form-control form-control-sm" name="typename" value="{tsTitle($item['typename'])}" />





</td><td>
    <input type="hidden" name="typeid" value="{$item['typeid']}">
    <input type="submit" class="btn btn-sm btn-outline-secondary" value="修改" />

    <a class="btn btn-sm" href="{tsUrl('group','edit',array('ts'=>'typedelete','groupid'=>$groupid,'typeid'=>$item['typeid']))}" >删除</a></td>
</tr>
</form>
{/loop}
</tbody>
</table>


</div>
<div class="col-md-4"></div>
</div>



</div>
</div>

</div>
{php include pubTemplate("footer")}